package com.csbc.arithmetic.fruit;

import java.math.BigDecimal;

public class Mango extends Fruit  {

    public Mango( Integer price){
        this.price = price;

        isPromotion = false;

    }

    public Mango(Integer price,Boolean isPromotion , Double discount){
        this.price = price;
        this.isPromotion= isPromotion;
        this.discount = discount;
        if (isPromotion){
            this.promotionPrice = BigDecimal.valueOf(price).multiply(BigDecimal.valueOf(discount));
        }
    }

    @Override
    public Integer getPrice() {
        return super.getPrice();
    }

    @Override
    public void setPrice(Integer price) {
        super.setPrice(price);
    }

    @Override
    public boolean isPromotion() {
        return super.isPromotion();
    }

    @Override
    public void setPromotion(boolean promotion) {
        super.setPromotion(promotion);
    }

    @Override
    public Double getDiscount() {
        return super.getDiscount();
    }

    @Override
    public void setDiscount(Double discount) {
        super.setDiscount(discount);
    }

    @Override
    public BigDecimal getPromotionPrice() {
        return super.getPromotionPrice();
    }

    @Override
    public void setPromotionPrice(BigDecimal promotionPrice) {
        super.setPromotionPrice(promotionPrice);
    }
}
